﻿
seajs.config({
    base: '../js/',
    alias: {
        'labjs': 'lib/LAB.min',
    }
});


define(function (require) {
    require('labjs');
    
        
    // 载入基础lib
    $LAB.script('../js/lib/jquery-1.6.1.min.js').wait()
        .script('../js/lib/jquery.mobile-1.0b2.js').wait()
        .script('../js/lib/underscore-min.js').wait()
        .script('../js/lib/backbone.min.js').wait(
            function () {
                var service = require('utility/service');
                service.Login(function(e){
                    service.setAuthToken(e.Data.Token);
                    if(e.Status == "Success"){
                        var FeedContainerView = require('views/feedcontainer.view');       
                        var feedContainerView = new FeedContainerView();
                        feedContainerView.render();
                        $(feedContainerView.el).addClass('fit-panel').attr("data-order","1");
                        $('.feed-list').listview();                
                        $('#page').append(feedContainerView.el);
                        $('#page').page('destroy').page();
                    }
                },{userName:  'hg', password: '123456'});
          
                
            }
        )
});
